import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.NativeLibrary;

/**
 * create by znr48268 on 2018/12/25
 */
public class TestDll {
    public interface Dll extends Library {
        Dll instance = (Dll) Native.loadLibrary("ReaderApi", Dll.class);

        public int uart_trans_send(char p1, int d_len);
    }

    public static void main(String[] args) {
        String path = TestDll.class.getResource("/").getPath() ;
        NativeLibrary.addSearchPath("testzhuzhan", path);

        int num = Dll.instance.uart_trans_send('a', 3);
        System.out.println(num);
    }
}

